package com.agent.course.mapper;

import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ClassMemberMapper {
    /**
     * 获取班级成员userId列表
     * @param classId
     * @return
     */
    @Select("select userId from classmember where classId=#{classId} order by addTime desc")
    List<String> getUserIds(String classId);

    /**
     * 获取学生加入的班级classId列表
     * @param userId
     * @return
     */
    @Select("select classId from classmember where userId=#{userId} order by addTime desc")
    List<String> getStudentClassesId(String userId);
}
